package com.kevin.food.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.fastjson.JSON;
import com.kevin.food.service.IFoodService;
import com.kevin.food.util.ResultObject;

@RestController
@RequestMapping("/food")
public class FoodAction {
	
	@Autowired
	@Qualifier("foodService")
	private IFoodService foodService;
	
	
	@RequestMapping("/list")
	private ResultObject listFood(@RequestBody Map<String, Object> params) {
		System.out.println(JSON.toJSONString(params));
		return new ResultObject("100", "success", foodService.queryList(params));
	}
}
